search/password entry: Prevent expand leaks
authorMatthias Clasen <mclasen@redhat.com>
Fri, 22 Feb 2019 20:55:05 +0000 (15:55 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 22 Feb 2019 20:55:05 +0000 (15:55 -0500)
We don't want the entry to expand, we just want
the text to expand inside the box, so explicitly
unset expand flags on the box.

gtk/gtkpasswordentry.c
gtk/gtksearchentry.c

index 16a811a8b3583bf30240032c7acc7352f960f415..78f12b0d6261cb4a01edd14a180e3a3493bb332b 100644 (file)
@@ -90,6 +90,8 @@ gtk_password_entry_init (GtkPasswordEntry *entry)
   gtk_widget_set_has_surface (GTK_WIDGET (entry), FALSE);
 
   priv->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+  gtk_widget_set_hexpand (priv->box, FALSE);
+  gtk_widget_set_vexpand (priv->box, FALSE);
   gtk_widget_set_parent (priv->box, GTK_WIDGET (entry));
 
   priv->entry = gtk_text_new ();
index 188ede1d9fdf08be161e4635c3371cf1f8cd9fe3..a227956e932e9f65f44eb1df78f5b49c1e2fb64e 100644 (file)
@@ -506,6 +506,8 @@ gtk_search_entry_init (GtkSearchEntry *entry)
 
   priv->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
   gtk_widget_set_parent (priv->box, GTK_WIDGET (entry));
+  gtk_widget_set_hexpand (priv->box, FALSE);
+  gtk_widget_set_vexpand (priv->box, FALSE);
 
   priv->entry = gtk_text_new ();
   gtk_widget_set_hexpand (priv->entry, TRUE);